home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
hslkslt2.zip
/
HSLKSALT.SLT
< prev
Wrap
Text File
|
1992-01-06
|
3KB
|
144 lines
// Telix SALT script by Dave Whittaker
// 6 NOV 91
// Revised 06 JAN 92 by Paul Gardner
// Changed recusion to while loops
//
// Used to run HS/Link Bi-Directional protocol from Telix.
// Menu allows online creation or deletion of upload list.
// Also has option for starting the protocol from a menu.
int f; str listloc[] = "d:\list.txt";
int v;
int select; str proto[] = "c:\telix\hslink.exe";
int q; str comline_opt[] = "-Uc:\zip @d:\list.txt";
str data[64];
main()
{
_fore_color = 14;
_back_color = 1;
select = 0;
v=(vsavearea(0,10,79,23));
while (select == 0)
{
menu();
}
restore();
return();
}
// --------------------- END MAIN ---------------------------------------
//
// FUNCTIONS CALLED FROM MAIN:
//
// BOXER
// Makes a clean half screen blue box.
boxer()
{
box(0,10,79,23,0,0,17);
}
// LISTING
// Makes list of files to upload.
listing()
{
q = 'y';
while (q=="Y" || q=="y")
{
boxer();
f=fopen(listloc,"a+");
pstraxy(" Prepare Uploads List",1,10,30);
pstraxy("Enter full path and filename now...",1,13,30);
gotoxy(1,14);
gets(data,64);
pstraxy("Writing to LIST.TXT now.",1,15,30);
fseek(f,0,2);
fputs(data,f);
fputs("^M^J",f);
fclose(f);
pstraxy("Hit 'Y' for another; or any other key to quit.",1,17,30);
q=inkeyw();
}
}
// MENU
// Prints a menu in the box to select the list option or start the
// protocol.
menu()
{
boxer();
pstraxy(" HS/Link Transfer Menu",1,10,16);
pstraxy(" Select an Option:",1,13,20);
pstraxy(" 1. Start Transfer Immediately",1,15,30);
pstraxy(" 2. Prepare Uploads List",1,17,30);
pstraxy(" 3. Delete Uploads List",1,19,30);
pstraxy(" 4. Return to Telix Terminal Mode",1,21,30);
select = inkeyw();
if (select == "1")
{
linkup();
select = 9;
}
if (select == "2")
{
listing();
select = 0;
}
if (select == "3")
{
dos("del d:\list.txt",0);
select = 0;
}
if (select == "4")
{
select = 9;
}
else
{
select = 0;
}
}
// LINKUP
// Starts the transfer using HS/Link protocol.
linkup()
{
run(proto,comline_opt,0);
restore();
}
// restore
// Restores screen and exits the script.
restore()
{
vrstrarea(v);
}